
// openid

// 注册
// https://api.gentos.hengxiao.net/v1/user/auth/register
// 添加流量计
// https://api.gentos.hengxiao.net/v1/user/flowmeter/link/
// {
//     "user_token": string,
//     "flowmeter_serial_number": string,  //发送格式
//     "flowmeter_nickname": string
// }
// 列表页
// https://api.gentos.hengxiao.net/v1/user/flowmeter/list/
// {
//     "serial_number": string, // 流量计ID
//     "nickname": string, // 流量计昵称
//     "latest_flow": integer, // 最新读数
//     "latest_measure_time": string // 最新读数的时间
// }
// 历史读数
// https://api.gentos.hengxiao.net/v1/user/flow/view-history/
// 最新读数
// https://api.gentos.hengxiao.net/v1/user/flow/view/
// {
//     "value": integer, //最新读数
//     "measure_time": string  //获取时间
// }
// const URL = 'https://api.gentos.hengxiao.net/v1/user'
const URL = '/apis'
function getUrl(params) {
    var url = URL + params
    return url
}

// export const openid = getUrl('auto/register')
// export const isUser = getUrl('/')
export const register = getUrl('/auth/register')
export const addDevice = getUrl('/flowmeter/link')
export const lists = getUrl('/flowmeter/list')
export const line = getUrl('flow/view-history/')
export const newData = getUrl('flow/view/')